package com.putao.tinytime.adapter;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.putao.tinytime.fragments.SenceFragment;

import java.util.ArrayList;

/**
 * Created by jidongdong on 15/3/20.
 */
public class SenceViewPagerAdapter extends FragmentPagerAdapter {
    private ArrayList<SenceFragment> mFragments;

    public SenceViewPagerAdapter(FragmentManager fm, ArrayList<SenceFragment> fragments) {
        super(fm);
        mFragments = fragments;
    }

    @Override
    public SenceFragment getItem(int i) {
        return mFragments == null ? null : mFragments.get(i);
    }

    @Override
    public int getCount() {
        return mFragments == null ? 0 : mFragments.size();
    }
}
